

			<div class="container">  
				<div id="product-list">
				<div class="page-header" style="position:relative;">
					<h3>Products</h3>
				</div>
				   <!-- </div>-->
					<!--<div class="row-fluid">
						<div class="span10">
							<ul class="horizontal">
                            	<?php if($this->tank_auth->is_url('product/add')){ ?>
									<li><a href="<?php echo site_url('product/add');?>" class="btn">Add Product</a></li>
                                    
                                <?php } ?>
							</ul>
						</div>
					</div>-->
					
					<?php
					if(empty($hasil)){
						echo "<table class='table table-striped'>
							<thead>
								<tr>
									<td>Product Name</td>
									<td>Price</td>
									<td>Status</td>
									<td>Category</td>
									<td>Quantity</td>
								</tr>
							</thead>
						</table>";
					}else{
					?>
						<table class="table table-striped">
							<thead>
								<tr>
									<td width="1" style="text-align: center;"><input type="checkbox" class="chk_boxes"  /></td>
                                    <td>Image</td>
									<td>Product Name</td>
									<td>Price</td>
									<td>Status</td>
									<!--<td>Category</td>-->
									<td>Quantity</td>
                                    <?php if($this->tank_auth->is_url('product/updatedata') || $this->tank_auth->is_url('product/deletedata')){ ?> 
										<td>Action</td>
                                    <?php } ?>
								</tr>
							</thead>
							<?php foreach ($hasil as $row): ?>
								<tr>
									<td width="1" style="text-align: center;"><input name="chk[<?php echo $row->product_id ?>]" id="checkbox[]" class="chk_boxes1" type="checkbox" value="<?php echo $row->product_id ?>" /></td>
                                    <?php if($row->image_file == NULL){ ?>
                                    <td><img style="padding:3px; border:#666 1px solid; " width="40px" height="40px" src="/commerce/assets/img/no-image-100x100.png"/></td>
                                    <?php }else{ ?>
                                    <td><img style="padding:3px; border:#666 1px solid; " width="50px" height="50px" src="/commerce/data/thumb/<?php echo $row -> image_file?>"/></td>
                                    <?php } ?>
									<?php /*if($this->tank_auth->is_url('product/detail')){*/ ?>
											<td><?php echo $row -> product_name ?></td>
                                    <?php /*}*/ ?>
									<td><?php echo number_format($row -> price) ?></td>
									<td><?php if ($row->status == "1") { ?>
										  Enabled
										  <?php } else { ?>
										  Disabled
										  <?php } ?></td>
									<!--<td><?php echo $row -> category_id ?></td>-->
									<td><?php echo $row -> quantity ?></td>
									<!--<?php if($this->tank_auth->is_url('product/updatedata')){ ?>
											<td><?php echo anchor('product/updatedata/'.$row->product_id, '<i class="icon-edit"></i>', 'title = "Edit"') ;?>
                                        <?php } ?>-->
                                        <?php if($this->tank_auth->is_url('product/deletedata')){ ?>
                                    		<td> 
                                            <a class="product-detail" href="<?php echo site_url('product/detail/'.$row->product_id);?>" title="View"><i class="icon-list-alt"></i></a>
                                            <a href="<?php echo site_url('product/deletedata/'.$row->product_id);?>" onclick="return confirmDelete();" title = "Delete"><i class="icon-trash"></i></a></td> 
                                           
                                        <?php } ?>         
								</tr>
								 <?php endforeach; ?> 
						</table>
                        <!--<input name="delete" type="submit" value="Delete" class="btn"/>-->
                        <!--<a href="<?php echo site_url('product/deletedata');?>" class="btn">Delete </a>-->
					<?php
					}
					?>
                    <center>
              			<?php echo $pagination; ?>
            		</center>
				</div>
			</div>
        
        <script type="text/javascript" language="javascript">
			$(function() {
  				$('.chk_boxes').click(function(){
					var chk = $(this).attr('checked')?true:false;
					$('.chk_boxes1').attr('checked',chk);
				});
			});
		</script> 